import { ApiProperty } from "@nestjs/swagger";
import { Column, CreateDateColumn, Entity, UpdateDateColumn } from "typeorm";

export class CreateUserTodo {
  // 用户账号
  @Column()
  @ApiProperty({ description: "用户账号" })
  account: string;

  // 用户手机号
  @Column()
  @ApiProperty({ description: "用户手机号" })
  phone: number;

  // 用户昵称
  @Column()
  @ApiProperty({ description: "用户昵称" })
  nickname: string;

  // 用户密码
  @Column()
  @ApiProperty({ description: "用户密码" })
  password: string;

  // 用户邮箱
  @Column()
  @ApiProperty({ description: "用户邮箱" })
  email?: string;

  // 用户头像
  @Column()
  @ApiProperty({ description: "用户头像" })
  avatar?: string;
}

export class UpdateUserTodo extends CreateUserTodo {
  @Column()
  @ApiProperty()
  id: string;
}

export class ListUserTodo extends UpdateUserTodo {
  @Column()
  @ApiProperty()
  createTime: Date;

  @Column()
  @ApiProperty()
  updateTime: Date;

  @Column()
  @ApiProperty()
  isDelete: Boolean;
}
